Technical Q&A QA1166
OpenGL Sample Code

Q: What happened to all the OpenGL sample code? Why are all the names different?

A: OpenGL sample code was recently revised to conform to a new naming convention as well as to update the projects and files to Xcode 1.5. Samples containing CodeWarrior or ProjectBuilder projects were also updated with an Xcode 1.5 project, however the original CodeWarrior projects remain unchanged. The table at the bottom of this document provides an index of the previous sample names and their corresponding new sample name.

The new naming convention is designed to allow developers to more easily assess the sample's purpose and identify the OpenGL interface that it uses. Each sample name is prefixed with a 3 or 4 letter code indicating the interface technology used (AGL, CGL, GLUT or NSGL), followed by the name of the sample itself, which should be relatively descriptive of what it is demonstrating. Note that some samples were already named accordingly, so no changes were made. They are included here for the sake of completeness.

  • AGL is the prefix for Carbon samples using the AGL interface

  • CGL is the prefix for samples using CGL directly, followed by 'Carbon' or 'Cocoa' to indicate the technology it uses

  • GLUT is the prefix for samples using the GLUT interface and functions

  • NSGL is the prefix for samples using Cocoa and the NSOpenGL classes

Note: These name changes will not happen immediately. The current plan is to roll the changes out slowly, a few samples at a time, starting with the AGL samples and continuing in alphabetical order. The process is scheduled to begin shortly after the Thanksgiving holiday 2004 and should be finished in the beginning of 2005. This document will remain current for the duration of the changeover.

Table 1: OpenGL Sample Code Names

New Sample NameOld Sample Name
AGLClipBufferRectaglClipBufferRect
AGLFullscreenGLCarbonAGLFullscreen
AGLImageOpenGL_Image
AGLQuicktimeMovieOpenGL_Movie
AGLRedRocketDemoRed_Rocket
AGLSharedPBufferGLCarbonSharedPbuffer
AGLSingleContextPBufferGLCarbon1ContextPbuffer
AGLSnapshotCarbon_GLSnapshot
AGLStereoOpenGL_Stereo
AGLSurfaceTextureAGLSurfaceTexture
AGLWindowGLCarbonAGLWindow
CGLCarbonFullscreenGLCarbonCGLFullscreen
GLUTglut
GLUTBasicsGLUTBasics
GLUTStereoGLUTStereo
GLUTSurfaceTextureGLUTSurfaceTexture
NSGLBoingXBoingX
NSGLCompositorLabOpenGLCompositorLab
NSGLCubePuzzleCubePuzzle
NSGLCustomViewCustom_Cocoa_OpenGL
NSGLChildWindowDemoGLChildWindowDemo
NSGLDrawPixelsDraw_Pixels
NSGLFullscreenNSOpenGL_Fullscreen
NSGLModellerModeller
NSGLNURBSSurfaceVertexProgramNURBSSurfaceVertexProgram
NSGLScreenSaverOpenGL_Screensaver
NSGLSurfaceVertexProgramSurfaceVertexProgram
NSGLTextureRangeTextureRange
NSGLVBLVBL
NSGLVertexOptimizationVertex_Optimization
NSGLVertexPerformanceTestVertexPerformanceTest
NSGLWindowCocoa_OpenGL

Document Revision History

DateNotes
2004-12-01First Version

Posted: 2004-12-01